﻿using System;
using System.Linq;

using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.DependencyInjection;

using Xc.Logics.CodeReaders.Models;
using Xc.Logics.CodeReaders.Views;
using Xc.Views.Core;

namespace Xc.Logics.CodeReaders
{
    [Boot("FilterStudio", "V1.0.0.0")]
    public class StartUp : ApplicationBooster<AppSetting>
    {
        public StartUp(string applicationName, string applicationVersion) : base(applicationName, applicationVersion)
        {

        }

        /// <summary>
        /// 启抽象类
        /// </summary>
        public StartUp()
        {

        }
        public MainView GetMainView()
        {
           return   this.GetMainElement<MainView>();
        }
        protected override void BeforeBuild(IServiceCollection serviceDescriptors)
        {
            serviceDescriptors.AddTransient<MainView>();
            serviceDescriptors.AddCameraService();
            base.BeforeBuild(serviceDescriptors);
        }
    }
}
